package org.dromara.netbar.domain.bo;

import org.dromara.netbar.domain.NetbarProduct;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

/**
 * 商品信息业务对象 netbar_product
 *
 * @author ZhouWenTao
 * @date 2025-08-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = NetbarProduct.class, reverseConvertGenerate = false)
public class NetbarProductBo extends BaseEntity {

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { EditGroup.class })
    private Long productId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productName;

    /**
     * 商品编码
     */
    @NotBlank(message = "商品编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productCode;

    private Long stock;
    /**
     * 条形码
     */
    private String barcode;

    /**
     * 分类ID
     */
    private Long categoryId;

    /**
     * 品牌
     */
    private String brand;

    /**
     * 规格描述
     */
    private String spec;

    /**
     * 单位
     */
    private String unit;

    /**
     * 图片
     */
    private String image;

    /**
     * 销售价
     */
    @NotNull(message = "销售价不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long salePrice;

    /**
     * 成本价
     */
    @NotNull(message = "成本价不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long costPrice;

    /**
     * 重量(kg)
     */
    private Long weight;

    /**
     * 状态（0上架 1下架）
     */
    private String status;


}
